package actives;

import org.bukkit.entity.Player;

import skills.SkillHandler;
import skills.Skills;

public class SwordsActive extends Active {

	public SwordsActive(Player player) {
		super(player);
	}
	
	@Override
	protected void activate(Object object) {
		if (state.equals(ActiveState.PRIMED)) {
			player.sendMessage("DEMACIA!");
			state = ActiveState.COOLDOWN;
			setCooldownTime();
			timer.restart();
		}		
	}
	
	@Override
	protected void setCooldownTime() {
		int level = SkillHandler.getSkill(player, Skills.SWORDS).level();
		time = 425 - level / 4;
	}
}
